<?php
/**
* Modèle HTML : <input type="checkbox" name="[name]" id="[id]" value="[value]" checked="[checked]" /> <label for="[name]">[label]</label>
*/
class ecCheckBox extends ecFormElement
{
	public function __construct()
	{
		$this->required = false;
	}

	public function getHtml()
	{
		$checked = ($this->defaultChoice) ? ('checked="checked"') : '';
		return '<input type="checkbox" name="'.$this->name.'" id="'.$this->name.'" value="'.$this->value.'" '.$checked.'"/> <label for="'.$this->name.'">'.$this->label.'</label>';
	}
}